# -*- coding: cp936 -*-
import os
import pygame,sys
from pygame.locals import *
os.environ["SDL_VIDEO_CENTERED"] = "1"
game_clock = pygame.time.Clock()
game_speed = 60
game_screenwidth,game_screenheight = 640,480
game_playing = True
game_bgcolor = 0,0,0
square_color = 255,255,255  
square_x,square_y = 0,0 
square_size = 20
food_x,food_y = 100,0
food_color = 255,255,255
pygame.init()
pygame.display.set_caption("pysnake")
game_screen=pygame.display.set_mode((game_screenwidth,game_screenheight))
while game_playing:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            game_playing = False
    game_screen.fill(game_bgcolor)
    pygame.draw.rect(game_screen,square_color,(square_x,square_y,
                                               square_size,square_size+20))
    pygame.draw.rect(game_screen,square_color,(food_x,food_y,
                                               square_size,square_size))
    pygame.display.flip()
    game_clock.tick(game_speed)
pygame.quit()
sys.exit(0)
